//
//  OrderDetailViewController.h
//  OrderSeat
//
//  Created by haiming on 13-10-10.
//  Copyright (c) 2013年 wangwei. All rights reserved.
//
#import "MyOrderView.h"
#import <MessageUI/MFMessageComposeViewController.h>

@class OrderDetailCell;
@class OrderDetailDataSource;
@interface OrderDetailViewController : BaseViewController<MFMessageComposeViewControllerDelegate,UINavigationControllerDelegate>

@property (weak, nonatomic) IBOutlet UIView *statusView;
@property (strong, nonatomic) IBOutlet UILabel *orderStateLabel;
@property (strong, nonatomic) IBOutlet UIButton *cancelOrderBtn;
@property (strong, nonatomic) IBOutlet UIScrollView *theScrollview;
@property (weak, nonatomic) IBOutlet UITableView *headTable;
@property (weak, nonatomic) IBOutlet UITableView *detailTable;

@property (strong, nonatomic) NSString *orderId;
@property (assign, nonatomic) OrderType orderType;
@property (strong, nonatomic) OrderDetailDataSource *dataSource;

- (id)initWithOrderId:(NSString*)orderId andType:(OrderType)orderType;

@end

@interface OrderDetailDataSource : BaseDataSource<UITableViewDataSource,UITableViewDelegate>

@property (strong, nonatomic) NSMutableArray *headList;
@property (strong, nonatomic) NSMutableArray *detailList;
@property (strong, nonatomic) NSMutableDictionary *orderInfoDic;
@property (strong, nonatomic) OrderDetailViewController *viewController;
@property (strong, nonatomic) OrderDetailCell *detailCell;

- (void)fetchOrderInfo;
- (void)cancelOrder;

@end

